/**
 * pharma-model - 9 janv. 2011 guillaume
 */
package org.bspv.pharma.model;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

/**
 * @author guillaume
 */
@Entity
@Table(name = "MOVE")
public class Move extends Event {

    /**
     * serialVersionUID.
     */
    private static final long serialVersionUID = 1L;
    /**
     * Emplacement de départ.
     */
    @NotNull
    @ManyToOne
    private Place from;
    /**
     * Emplacement d'arrivée.
     */
    @NotNull
    @ManyToOne
    private Place to;
    /**
     * Fourniture déplacée.
     */
    @NotNull
    @ManyToOne
    private Supply supply;

    /**
     * @return the from
     */
    public final Place getFrom() {
        return from;
    }

    /**
     * @param from
     *            the from to set
     */
    public final void setFrom(final Place from) {
        this.from = from;
    }

    /**
     * @return the to
     */
    public final Place getTo() {
        return to;
    }

    /**
     * @param to
     *            the to to set
     */
    public final void setTo(final Place to) {
        this.to = to;
    }

    /**
     * @return the supply
     */
    public final Supply getSupply() {
        return supply;
    }

    /**
     * @param supply
     *            the supply to set
     */
    public final void setSupply(final Supply supply) {
        this.supply = supply;
    }
    
    /**
     * @return the eventType
     */
    public EventTypeEnum getEventType() {
        return EventTypeEnum.MOVE;
    }

}
